
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>FORUM!</title>
</head>
<jsp:useBean class="beans.Hax" id="b" scope="page"/>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="subforums" value="${b.subforum}"/>
<body>
	
	<h1>Index!</h1>
	<td>
	<div style="float:right;margin-left:auto;margin-right:0px;">
	<%@ include file="LoginForm.jsp" %>
	</div>
	<div style="float:left;width:50%;">
		<table border="1">
		<th>Sub-Forum</th>
		<th>Latest Thread</th>
		<th>#Threads</th>
		<c:forEach var="subforum" items="${subforums}">
			<tr>
				<td width = "25%"><a href="subforum.jsp?subForumID=${subforum.subForumID}" style="color:#000000;"><big><nobr>${subforum.name}</nobr></big></a></td>
				<td width = "65%" bgcolor="#E0E0E0">
					<a href="thread.jsp?subForumID=${subforum.subForumID}&threadID=${subforum.latestThread.threadID}" style="color:#000000;"><nobr>${subforum.latestThread.name}</nobr></a><br>
					<small>${subforum.latestThread.createdOn }</small>
				</td>
				<td width="10%" align="center">${subforum.numberOfThreads}</td>
			</tr>
		</c:forEach>
		</table>
	</div>
	</td>
</body>
</html>